package cn.circle.system.util;


import java.io.Serializable;
import java.util.Set;

/**
 * 保存登录用户信息
 * 
 * @author 吴泽磊 时间：2016/10/18
 */
public class LoginInfo implements Serializable {

	private static final long serialVersionUID = 8607140444079015009L;
	private Integer userId; // 用户编号
	private Integer depId; // 用户所在单位或部门
	private Integer roleIds; // 用户角色编号
	//private String roleName; // 用户角色名称
	private String userName; // 用户姓名
	private String ip; // 用户登录的IP地址
	private Long loginTime = System.currentTimeMillis();
	private Set<String> moduleIds; // 用户可操作的模块ID号

	public LoginInfo() {
	}

	public LoginInfo(Integer userId, Integer depId, Integer roleIds,  String userName, String ip,
			Long loginTime) {
		super();
		this.userId = userId;
		this.depId = depId;
		this.roleIds = roleIds;
		//this.roleName = roleName;
		this.userName = userName;
		this.ip = ip;
		if (loginTime != null)
			this.loginTime = loginTime;
	}

	public static LoginInfo Init() {
		return new LoginInfo();
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getDepId() {
		return depId;
	}

	public void setDepId(Integer depId) {
		this.depId = depId;
	}

	public Integer getRoleId() {
		return roleIds;
	}

	public void setRoleId(Integer roleIds) {
		this.roleIds = roleIds;
	}

//	public String getRoleName() {
//		return roleName;
//	}
//
//	public void setRoleName(String roleName) {
//		this.roleName = roleName;
//	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Long getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Long loginTime) {
		this.loginTime = loginTime;
	}

	public Set<String> getModuleIds() {
		return moduleIds;
	}

	public void setModuleIds(Set<String> moduleIds) {
		this.moduleIds = moduleIds;
	}

}
